package com.yudi.blog.bussiness.service.impl;

import com.yudi.blog.bussiness.dao.UserRepository;
import com.yudi.blog.bussiness.dto.User;
import com.yudi.blog.bussiness.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author YuDi
 * @Date 2021/11/10 14:18
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepository userRepository;

    @Override
    public User checkUser(String username, String password) {
        User user = userRepository.findByUsernameAndPassword(username, password);
        return user;
    }
}
